package com.speedchina.framework.exception;

import com.speedchina.framework.model.R;

import java.io.Serializable;

/**
 * 自定义断言异常
 *
 * @author hank
 * @create 2019-01-15 下午3:54
 **/

public class AssertException extends RuntimeException{

    private Serializable code;

    private String msg;

    public AssertException() {
        this(R.ERROR, "断言异常,请查询异常原因");
    }

    public AssertException(String msg) {
        this(R.ERROR, msg);
    }

    public AssertException(Serializable code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public Serializable getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
